<?php include APPLICATION_PATH . '/modules/default/layouts/scripts/content-outer-start.phtml'; ?>
<div align="center">   
<form id="mainform" action="<?php echo $this->baseUrl ?>/default/tracuu/index" method="post">
    <div class="form_row">
    <table>
        <tbody>
            <tr>
                <td width="10%"></td>
                <td class="label_name"><strong>Mã khách hàng</strong></td>
                <td>                                    
                    <input type="text" class="input_css" name="madaily" id="madaily" value="<?php echo $this->madaily ?>">                       
                </td>

                <td class="label_name"><strong>Số CMND</strong></td>
                <td>                    
                    <input type="text" class="input_css" name="cmnd" id="cmnd" value="<?php echo $this->cmnd ?>">
                </td>     
                <td width="40%"></td>
            </tr>               
        
            <tr>
                <td width="10%"></td>
                <td class="label_name"><strong>Tháng</strong></td>
                <td> 
                    <select id="thang" name="thang" class="select_css" style="background-color: #FFFFFF" value="<?php echo $this->thang ?>">
                        <?php
                        for ($i = 1; $i <= 12; $i++) {
                            $selected = "";
                            if ($this->thang == $i) {
                                $selected = "selected";
                            }
                            if ($i < 10) {
                                echo '<option value="' . '0' . $i . '"' . $selected . '>' . '0' . $i . '</option>';
                            } else {
                                echo '<option value="' . $i . '"' . $selected . '>' . $i . '</option>';
                            }
                        }
                        ?>
                    </select>
                </td>

                <td class="label_name"><strong>Năm</strong></td>
                <td>                    
                    <select id="nam" name="nam" class="select_css" style="background-color: #FFFFFF" value="<?php echo $this->nam ?>">
                        <?php
                        for ($i = 2010; $i <= 2020; $i++) {
                            $selected = "";
                            if ($this->nam == $i) {
                                $selected = "selected";
                            }
                            echo '<option value="' . $i . '"' . $selected . '>' . $i . '</option>';
                        }
                        ?>
                    </select>      
                </td>
                <td width="40%">
                    <div class="form_row" align="center">
                        <input type="submit" id="save" value="Tra cứu" class="button gray">
                    </div>
                </td>
            </tr>
        </tbody>
    </table>
    </div>
    
        
    <div class="form_row">  
        
    <br><br><br><br>
    <h1><b>THÔNG TIN KHÁCH HÀNG</b></h1>
    <br><br>
    
    <table class="Grid" cellspacing="0" cellpadding="3" rules="all" border="1" id="tableData" style="width:100%;border-collapse:collapse;">
        <tbody>
            <tr class="GridHeader" align="center">
                <th align="center" scope="col">Mã khách hàng</th>
                <th align="center" scope="col">Tên khách hàng</th>
                <th align="center" scope="col">Cấp</th>
                <th align="center" scope="col">Người đại diện</th>
                <th align="center" scope="col">Ngày sinh</th>
                <th align="center" scope="col">Số CMND</th>
                <th align="center" scope="col">Số DT</th>
                <th align="center" scope="col">Địa chỉ</th>
                <th align="center" scope="col">Ngày gia nhập</th>
            </tr>
            <?php
            if ($this->daily) {
                $daily = $this->daily;
                ?>
                <tr class="GridItem" align="center">
                    <th align="center" scope="col"><?php echo $daily['MaDaiLy']; ?></th>
                    <th align="center" scope="col"><?php echo $daily['TenDaiLy']; ?></th>
                    <th align="center" scope="col"><?php echo $daily['CapDaiLy']; ?></th>
                    <th align="center" scope="col"><?php echo $this->dailycha ?></th>
                    <th align="center" scope="col"><?php echo $daily['NgaySinh']; ?></th>
                    <th align="center" scope="col"><?php echo $daily['SoCMND']; ?></th>
                    <th align="center" scope="col"><?php echo $daily['Sdt']; ?></th>
                    <th align="center" scope="col"><?php echo $daily['DiaChi']; ?></th>
                    <th align="center" scope="col"><?php echo $daily['NgayGiaNhap']; ?></th>
                </tr>
                <?php
            } else {
                ?>
                <tr class="GridItem" align="center">
                    <th align="center" scope="col" colspan="9"><?php echo $this->error; ?></th>
                </tr>
            <?php
            }
            ?>
        </tbody>
    </table>
    </div>
    
    
    <div class="form_row">          
    <br><br><br><br>
    <h1><b>THÔNG TIN LỢI NHUẬN</b></h1>
    <br><br>
    
    <table class="Grid" cellspacing="0" cellpadding="3" rules="all" border="1" id="tableData" style="width:100%;border-collapse:collapse;">
        <tbody>
            <tr class="GridHeader" align="center">  
                <th align="center" scope="col">Lợi nhuận 10%</th>                        
                <th align="center" scope="col">Lợi nhuận 2%</th>
            </tr>
            <?php
            if ($this->daily) {
                $daily = $this->daily;
                ?>
                <tr class="GridItem" align="center"> 
                    <th align="center" scope="col"><?php echo $this->loinhuan; ?></th>
                    <th align="center" scope="col"><?php echo $this->bonus; ?></th>
                </tr>
                <?php
            } else {
                ?>
                <tr class="GridItem" align="center">
                    <th align="center" scope="col" colspan="2"><?php echo $this->error; ?></th>
                </tr>
            <?php
            }
            ?>
        </tbody>
    </table>
    </div>
        
        
<!--    <div class="form_row">
        
        <br><br><br><br>
        <h1><b>THÔNG TIN ĐƠN HÀNG TỰ BÁN</b></h1>
        <br><br>
    
            <table class="Grid" cellspacing="0" cellpadding="3" rules="all" border="1" id="tableData" style="width:100%;border-collapse:collapse;">
                <tbody>
                    <tr class="GridHeader" align="center">
                        <th align="center" scope="col">STT</th>
                        <th align="center" scope="col">Đại lý mua</th>
                        <th align="center" scope="col">Tên sản phẩm</th>
                        <th align="center" scope="col">Đơn giá</th>
                        <th align="center" scope="col">Số lượng</th>
                        <th align="center" scope="col">Thuế(%)</th>
                        <th align="center" scope="col">Ngày bán</th>
                        <th align="center" scope="col">Thành tiền</th>
                        <th align="center" scope="col">Lợi nhuận</th>
                    </tr>
                    <?php
//                    if ($this->tableDataDHTB) {
//                        $i=1;
//                        foreach ($this->tableDataDHTB as $row) {
                    ?>
                            <tr class="GridItem" align="center">
                                <th align="center" scope="col"><?php // echo $i;?></th>
                                <th align="center" scope="col"><?php // echo $row['nameDLMua'];?></th>
                                <th align="center" scope="col"><?php // echo $row['nameSP'];?></th>
                                <th align="center" scope="col"><?php // echo $row['donGia'];?></th>
                                <th align="center" scope="col"><?php // echo $row['soLuong'];?></th>
                                <th align="center" scope="col"><?php // echo $row['thue'];?></th>
                                <th align="center" scope="col"><?php // echo $row['ngayBan'];?></th>
                                <th align="center" scope="col"><?php // echo $row['thanhTien'];?></th>
                                <th align="center" scope="col"><?php // echo $row['loiNhuan'];?></th>
                            </tr>
                    <?php
//                            $i = $i + 1;
//                        }
//                    } else{
                    ?>
                        <tr class="GridItem" align="center">
                            <th align="center" scope="col" colspan="10">Không có đơn hàng nào.</th>
                        </tr>
                    <?php
//                    }
                    ?>
                </tbody>
            </table>
        </div>
</form>
</div>-->

       
<?php include APPLICATION_PATH . '/modules/default/layouts/scripts/content-outer-end.phtml'; ?>